Skip to content

feat(security/tools): 为 bash 工具接入安全执行器#154

Merged
minorcell merged 2 commits into
1024XEngineer:mainfrom
Cai-Tang-www:codex/P0-4
Apr 5, 2026
Merged

feat(security/tools): 为 bash 工具接入安全执行器#154
minorcell merged 2 commits into
1024XEngineer:mainfrom
Cai-Tang-www:codex/P0-4

Conversation

@Cai-Tang-www

Copy link
Copy Markdown
Collaborator

Summary

  • 新增 bash 安全执行器,统一承接执行前参数校验、workspace 边界检查与权限决策映射。
  • bash 工具执行路径收敛到执行器,避免分散校验与裸执行。
  • 统一执行期控制:超时、输出截断与结构化错误返回。
  • 补充执行器与集成测试,覆盖 allow/deny/ask、workdir 越界、超时与输出截断等场景。

Test

  • go test ./internal/tools/bash/...

Closes #141
Refs #98

@codecov

codecov Bot commented Apr 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.36842% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/tools/bash/executor.go 89.87% 4 Missing and 4 partials ⚠️
internal/tools/bash/tool.go 75.00% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@minorcell minorcell merged commit 89da0c4 into 1024XEngineer:main Apr 5, 2026
2 checks passed
@Cai-Tang-www Cai-Tang-www deleted the codex/P0-4 branch April 5, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(security/tools): 为 bash 工具接入安全执行器

2 participants